tests: Port sysroot.js away from libgsystem
authorColin Walters <walters@verbum.org>
Tue, 9 Aug 2016 17:52:43 +0000 (13:52 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 9 Aug 2016 19:01:35 +0000 (19:01 +0000)
My case-sensitive `git grep` didn't find this one originally,
but the Travis+Debian setup was configured to run it.

Closes: #451
Approved by: jlebon

tests/test-sysroot.js

index 7c31659dfb8cae36e17447cd5347e32aa5821c3c..7e8fcf7ae723ad783462d4c5c2553ae09bf5b8a4 100644 (file)
@@ -19,8 +19,6 @@
 
 const GLib = imports.gi.GLib;
 const Gio = imports.gi.Gio;
-
-const GSystem = imports.gi.GSystem;
 const OSTree = imports.gi.OSTree;
 
 function assertEquals(a, b) {
@@ -36,12 +34,8 @@ function assertNotEquals(a, b) {
 function libtestExec(shellCode) {
     let testdatadir = GLib.getenv("G_TEST_SRCDIR");
     let libtestPath = GLib.build_filenamev([testdatadir, 'libtest.sh'])
-    let proc = GSystem.Subprocess.new_simple_argv(['bash', '-c',
-                                                  'set -xeuo pipefail; . ' + GLib.shell_quote(libtestPath) + '; ' + shellCode],
-                                                 GSystem.SubprocessStreamDisposition.INHERIT,
-                                                 GSystem.SubprocessStreamDisposition.INHERIT,
-                                                 null);
-    proc.wait_sync_check(null);
+    let proc = Gio.Subprocess.new(['bash', '-c', 'set -xeuo pipefail; . ' + GLib.shell_quote(libtestPath) + '; ' + shellCode], 0);
+    proc.wait_check(null);
 }
 
 libtestExec('setup_os_repository archive-z2 syslinux');